
package com.work.test;

public class DaoFactory {

	private volatile static DaoFactory instance;

	private DaoFactory()
	{}

	public static DaoFactory getInstance()
	{
		if (instance == null) {
			if (instance == null) {
				instance = new DaoFactory();
			}
			return instance;
		}
		else {
			return instance;
		}
	}

	private TestDao testDao = null;

	public TestDao getTestDao()
	{
		if (testDao == null) {
			testDao = new TestDao();
		}
		return testDao;
	}
}
